import {Names} from "@/store/store-nameSpace.ts";

export const useTestStore = defineStore(Names.test, {
    // 初始化值
    state: () => {
        return {
            curren: 100,
            name: "小满"
        }
    },
    persist: true,
    // 格式化： 类似于computed
    getters: {

    },
    //类似于methods 可以操作异步，同步提交
    actions: {
        setCurren() {
            this.curren++
        },
        setName(n: string) {
            this.name = n
        }
    }

})
